Fix XCom edit modal value not repopulating on reopen.#62798
Fix XCom edit modal value not repopulating on reopen.#62798Arbaaz123676 wants to merge 2 commits intoapache:mainfrom
Conversation
There was a problem hiding this comment.
This doesn't seem to fix the problem for me and some pieces of the change set seems irrelevant. (also CI need fixing)
Screen.Recording.2026-03-05.at.17.38.11.mov
Can you double check or eventually provide a recording of this scenario working on your end?
There was a problem hiding this comment.
As requested above you didn't provide more context (screenshot, explanation).
Part of the code change seem unrelated to the PR and looks like fully AI generated without any human double checking.
Closing the PR. Please do not re-open unless you are willing to actually spend the time needed to manually test this before asking for a review.
| onSuccess: async (response) => { | ||
| queryClient.setQueryData( | ||
| [ | ||
| useXcomServiceGetXcomEntryKey, | ||
| { | ||
| dagId, | ||
| dagRunId: runId, | ||
| deserialize: true, | ||
| mapIndex, | ||
| stringify: false, | ||
| taskId, | ||
| xcomKey, | ||
| }, | ||
| ], | ||
| response, | ||
| ); |
There was a problem hiding this comment.
Why are we changing this? Doesn't seem related.
There was a problem hiding this comment.
This updates the Query cache for a Airflow XCom entry using the API response after a successful request, so the UI updates immediately without refetching from the server.
There was a problem hiding this comment.
This manually query setting is also incorrect. The response.value is always a string even if it is a date or json object.
Screen.Recording.2026-03-10.at.6.19.02.AM.mov@pierrejeambrun It is working good on my end |
|
Looks to work. Let's just undo the onSuccess callback changes |
Summary
This PR fixes an issue where the XCom value was not displayed when reopening the edit modal after updating it.
Root Cause
The modal lifecycle and query behavior caused stale or skipped state updates when reopening the modal, leading to an empty value field.
Changes
lazyMountfrom the dialog to ensure proper unmount/remount behavior.datainstead ofdata?.value !== undefined.GetXcomEntriesandGetXcomEntryafter update.Result
The XCom edit modal now consistently repopulates the latest value when reopened.
Fixes #61486